Public Class HealthMonitor

    Private sw As Stopwatch
    Private averageCounter As PerformanceCounter
    'Private totalOpsCounter As PerformanceCounter

    Public Sub New()
        sw = New Stopwatch()
    End Sub

    Public Sub StartRecording()

        averageCounter = HealthManager.GetAverageTimePerOperationCounter
        sw.Start()
        'HealthManager.TryGetTotalOperationsCounter(totalOpsCounter)

        'totalOpsCounter.Increment()
    End Sub

    Public Sub EndRecording()

        sw.Stop()

        If averageCounter IsNot Nothing Then
            averageCounter.IncrementBy(sw.ElapsedTicks)
        End If

    End Sub

End Class
